<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<%@page import="vn.edu.hungvuongaptech.common.Constant"%>

<div id="head">
	<fmt:bundle basename="i18n">
	<div id="banner">
		<img src="<%=request.getContextPath()%>/images/banner_home_timesheet.png" width="986px" height="200px" />
	</div>

	<div id="menu">
		<ul id="nav">
			<c:choose>
				<c:when test="${sessionScope.role eq 1}">
					<!-- S Staff role -->
					<li><a href="<%= Constant.PATH_RES.getString("timesheet.staff.listTimeSheetPath") %>"><fmt:message key="timesheet.level1.TimeSheetLabel"/></a>
					<ul>
						<li>&nbsp;</li>
						<li><a href="<%= Constant.PATH_RES.getString("timesheet.staff.listTimeSheetPath") %>"><fmt:message key="timesheet.level2.ListTimeSheetLabel" /></a></li>
						<li><a href="<%= Constant.PATH_RES.getString("timesheet.staff.addTimeSheetPath") %>"><fmt:message key="timesheet.level2.AddTimeSheetLabel" /></a></li>
					</ul>
					</li>
					<li><a href="#"><fmt:message key="timesheet.level1.ReportLabel" /></a></li>
					<li><a href="<%= Constant.PATH_RES.getString("timesheet.helpPath") %>"><fmt:message key="timesheet.level1.HelpLabel" /></a></li>
					<!-- E Staff role -->
				</c:when>
				<c:when test="${sessionScope.role eq 2}">
					<!-- S Manager role -->
					<li><a href="<%= Constant.PATH_RES.getString("timesheet.manager.listTimeSheetPath") %>">TimeSheet</a>
					<ul>
						<li>&nbsp;</li>
						<li><a href="<%= Constant.PATH_RES.getString("timesheet.manager.listTimeSheetPath") %>"><fmt:message key="timesheet.level2.ListTimeSheetLabel" /></a></li>
						<li><a href="<%= Constant.PATH_RES.getString("timesheet.manager.addTimeSheetPath") %>"><fmt:message key="timesheet.level2.AddTimeSheetLabel" /></a></li>
					</ul>
					</li>
					<li><a href="#"><fmt:message key="timesheet.level1.ApproveLabel" /></a></li>
					<li><a href="#"><fmt:message key="timesheet.level1.ReportLabel" /></a></li>
					<li><a href="<%= Constant.PATH_RES.getString("timesheet.helpPath") %>"><fmt:message key="timesheet.level1.HelpLabel" /></a></li>
					<!-- E Manager role -->
				</c:when>
				<c:when test="${sessionScope.role eq 3}">
					<!-- S Administrator role -->
					<li><a href="<%= Constant.PATH_RES.getString("timesheet.admin.approvalPath") %>"><fmt:message key="timesheet.level1.ApproveLabel" /></a></li>
					<li><a href="<%= Constant.PATH_RES.getString("timesheet.admin.searchTimeSheetPath") %>"><fmt:message key="timesheet.level1.SearchTimeSheetLabel" /></a></li>
					<li><a href="#"><fmt:message key="timesheet.level1.ReportLabel" /></a></li>
					<li><a href="<%= Constant.PATH_RES.getString("timesheet.helpPath") %>"><fmt:message key="timesheet.level1.HelpLabel" /></a></li>
					<!-- E Administrator role -->
				</c:when>
				<c:otherwise>
					<li><a href="<%= Constant.PATH_RES.getString("timesheet.loginPath") %>"><fmt:message key="timesheet.level1.LoginLabel" /></a></li>
					<li><a href="#"><fmt:message key="timesheet.level1.HelpLabel" /></a></li>
				</c:otherwise>
			</c:choose>
		</ul>
	</div>
	<script type="text/javascript">
	    $(function() {
	        $('#nav li').hover(function() {
	            $(this).find('ul:first').css({visibility: "visible", display: "none"}).fadeIn().show(150);
				$(this).find('a:first').css({color: "#ffff99"});
	        }, function() {
	            $(this).find('ul:first').css({visibility: "hidden"});
				$(this).find('a:first').css({color: "#bfbfbf"});
	        });
	    });
	</script>

	<div id="bread-scrumb">
		<table width="100%">
			<tr>
				<td></td>
				<td align="right">
					<c:if test="${not empty sessionScope.username}" >
						<fmt:message key="timesheet.loginWelcome">
							<fmt:param value="${ sessionScope.username }"/>
							<fmt:param value="${ sessionScope.roleName }"/>
						</fmt:message> - <a class="link" href="<%= Constant.PATH_RES.getString("timesheet.changePasswordPath") %>">[<fmt:message key="timesheet.changePasswordLabel" />]</a> - <a class="link" href="<%= Constant.PATH_RES.getString("timesheet.logoutPath") %>">[<fmt:message key="timesheet.logoutLabel" />]</a>
					</c:if>
				</td>
			</tr>
		</table>
	</div>
	</fmt:bundle>
</div>